<template>
    <view>
        <view class="wrap">
            <view class="u-tabs-box">
                <text style="min-width: 100rpx;margin-right: 10rpx;">共 <text style="color: red;">{{totalNum}}</text> 条</text>
                <u-search shape="square" placeholder="请输入手机号或姓名" input-align="center" v-model="search" @clear="cancelSearch"
                    @custom="getPageList" @search="getPageList"></u-search>
            </view>
            <swiper class="swiper-box" v-if="listData.length">
                <swiper-item class="swiper-item">
                    <scroll-view scroll-y style="height: 100%;width: 100%;" :scroll-top="scrollTop" @scroll="changeScroll"
                        @scrolltolower="reachBottom">
                        <view class="page-box">
                            <contacts-list :listData="listData" :crmType="crmType"></contacts-list>
                        </view>
                        <u-loadmore :status="downStatus" bgColor="#f2f2f2"></u-loadmore>
                    </scroll-view>
                </swiper-item>
            </swiper>
            <u-empty v-else mode="list">暂无数据</u-empty>
            <view @click="addData" class="fixed-add-button" v-if="isSave">
                <u-icon name="plus" class="fixed-add-icon"></u-icon>
            </view>
            <view @click="refreshData" class="fixed-refresh-button">
                <u-icon name="reload" class="fixed-refresh-icon" :style="{transform:'rotate(' + rotateNum + 'deg)'}"></u-icon>
            </view>
        </view>
    </view>
</template>

<script>
    import contactsList from "./components/contactsList";
    import list from '../mixins/list.js';
    export default {
        data() {
            return {
                crmType: 'contacts'
            };
        },
        mixins: [list],
        onLoad() {
            
        },
        components: {
            contactsList
        },
        computed: {
            
        },
        methods: {

        }
    };
</script>
<style lang="scss">
    @import '@/pages/customerManagement/styles/list.scss';
    .page-box{
        min-height: calc(100%-50rpx);
    }
</style>
